package org.examcity.util.beanconverter;

public interface ConverterManager {

	Factory getDefaultFactory();

	Converter getDefaultConverter();

	Rule findRule(Class<?> sourceClass, Class<?> targetClass);

	void addRule(Rule rule);

	/**
	 * Converts an object into a new object of another class following the set of registered rules.
	 * 
	 * @param <T> Type of the target class
	 * @param sourceObject Template object (may be <code>null</code>)
	 * @param targetClass
	 * @return clone object (may be <code>null</code>)
	 * @throws ConverterException
	 */
	<T> T convert(Object sourceObject, Class<T> targetClass) throws ConverterException;

}
